<template>
  <view class="tab-content">
    <view class="l-title"> 付租方式 </view>
      <nut-radiogroup v-model="ztPrice.payRentType"> 
        <view class="al"> 
            <nut-radio label="0">月付</nut-radio>
            <nut-radio label="1">季付</nut-radio>
            <nut-radio label="2">日付</nut-radio>
        </view>    
        <view class="al"> 
            <nut-radio label="3">半年付</nut-radio>
            <nut-radio label="4">整年付</nut-radio>
        </view>     
      </nut-radiogroup>
    <view class="l-title"> 出租租金 </view> <InputArea placeholder="请输入出租金额" tail="元" :val="ztPrice.rent"  target="ztPrice" wename="rent"/>
    <view class="l-title"> 付租押金 </view> <InputArea placeholder="请输入押金金额" tail="元"  :val="ztPrice.deposit" target="ztPrice"   wename="deposit"/>
    <view class="l-title"> 物管费   </view> <InputArea placeholder="请输入物管费金额" tail="元-m-月"  :val="ztPrice.managementFee" target="ztPrice"   wename="managementFee"/>
    <view class="l-title"> 入住时间 </view>  <!-- settledTime -->

    <view class="flex">  
        <view class="time-btn" @click="$bus.emit('showTime')">
        {{ ztPrice.settledTime }}
       </view>
      <view class="time-btn">
        随时入住
       </view>
    </view>  

     

  </view>
</template>
<script>  
import InputArea from '../../../common/inputarea.vue' 
import Taro, { useReady,getCurrentInstance} from '@tarojs/taro' 
export default { 
 components:{ InputArea},   

 data() {
    return {
      ztPrice:{
          radioVal:1,
          radioVa2:2,
          settledTime:this.format.fromTime(),
      },  
    }
  },
  created(){
    this.$bus.on('showTimeBack', date => {
       console.log('时间更新', date)
       this.ztPrice.settledTime = date
    });
  },
  mounted(){ 
      var { slogan , describe} = this.$store.state.publishInfo
      
  },
  methods:{
      
      change(){
        this.$store.dispatch("asyncPublishInfo",{type:index});
      }, 

  }
}
</script>  
<style lang="less">
.al{
  display: flex;
  align-items: baseline;
}
.al>view{
  width: 100px;
}
.time-btn{
  border-radius: 4px;
  border: 1px solid #ccc;
  display: inline-flex;
  padding: 0 10px;
  color: #ccc;
  font-size: 12px;
}
</style>